package Demo;

public class Dog extends Animal{
    public Dog(int age,String name){
        super(age,name);
    }
    public boolean equals(Object obj){
        Dog tmp=(Dog)obj;
        return tmp.name.equals(this.name)&&tmp.age==this.age;
    }

}
